export function getUserCenter(headers?: any) {
    return $request.get({ url: '/user/center', headers })
}

// 个人信息
export function getUserInfo() {
    return $request.get({ url: '/user/info' })
}

// 个人编辑
export function userEdit(params: any) {
    return $request.post({ url: '/user/edit', params })
}

// 绑定手机
export function userBindMobile(params: any, headers?: any) {
    return $request.post(
        { url: '/login/bindMobile', params, headers },
        { withToken: !headers['ai-token'] }
    )
}

// 更改密码
export function userChangePwd(params: any) {
    return $request.post({ url: '/user/changePwd', params })
}

//忘记密码
export function forgotPassword(params: Record<string, any>) {
    return $request.post({ url: '/user/forgotPwd', params })
}

//邮箱忘记密码
export function emailForgotPassword(params: Record<string, any>) {
    return $request.post({ url: '/user/email/forgotPwd', params })
}

// 分享/邀请新用户
export function shareInvite(params: Record<string, any>) {
    return $request.post({ url: '/share/invite', params })
}

// 点击分享链接
export function shareClick(params: Record<string, any>) {
    return $request.post({ url: '/share/click', params })
}

// 我的创作
export function mydrawList(params: Record<string, any>) {
    return $request.get({ url: '/draw/records/myList', params })
}
// 我的创作列表
export function myClassList(params?: Record<string, any>) {
    return $request.get({ url: '/collection/list', params })
}

// 我的创作列表
export function addClass(params?: Record<string, any>) {
    return $request.post({ url: '/collection/add', params })
}